package com.sqrj.phoneorder.Controller;

import com.sqrj.phoneorder.common.JSONResult;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.util.Assert;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.servlet.ModelAndView;

@RestController
public class HelloWorldController {


    //测试springboot接口
    @RequestMapping(value = "/test",method = RequestMethod.GET)
    public JSONResult testException(String userName, String callback) {
        Assert.notNull(userName, "userName can't found");
        return new JSONResult(500,"error",new Object());
    }
}
